package com.stj.entity;

import java.util.Date;

public class Blog {
    private int id;
    private String title;
    private String summary;
    private Date releaseDate;
    private int clickHit;
    private int replyHit;
    private String content;
    private int typeId;
    /* 多对一*/
    private blogType blogType;

    public blogType getBlogType() {
        return blogType;
    }

    public void setBlogType(com.stj.entity.blogType blogType) {
        this.blogType = blogType;
    }

    public Blog() {}

    public Blog(String title, String summary, String content, int typeId) {
        this.title = title;
        this.summary = summary;
        this.content = content;
        this.typeId = typeId;
    }

    public Blog(int id, String title, String summary, String content, int typeId) {
        this.id = id;
        this.title = title;
        this.summary = summary;
        this.content = content;
        this.typeId = typeId;
    }

    public Blog(int id, String title, String summary, Date releaseDate, int clickHit, int replyHit, String content) {
        this.id = id;
        this.title = title;
        this.summary = summary;
        this.releaseDate = releaseDate;
        this.clickHit = clickHit;
        this.replyHit = replyHit;
        this.content = content;
    }

    public Blog(int id, String title, String summary, Date releaseDate, int clickHit, int replyHit, String content, int typeId) {
        this.id = id;
        this.title = title;
        this.summary = summary;
        this.releaseDate = releaseDate;
        this.clickHit = clickHit;
        this.replyHit = replyHit;
        this.content = content;
        this.typeId = typeId;
    }

    public int getId() { return id;}

    public void setId(int id) {this.id = id;}

    public String getTitle() {return title;}

    public void setTitle(String title) {this.title = title;}

    public String getSummary() {return summary;}

    public void setSummary(String summary) {this.summary = summary;}

    public Date getReleaseDate() { return releaseDate;}

    public void setReleaseDate(Date releaseDate) {this.releaseDate = releaseDate;}

    public int getClickHit() { return clickHit;}

    public void setClickHit(int clickHit) {this.clickHit = clickHit;}

    public int getReplyHit() {return replyHit;}

    public void setReplyHit(int replyHit) {this.replyHit = replyHit;}

    public String getContent() { return content;}

    public void setContent(String content) {this.content = content;}

    public int getTypeId() { return typeId; }

    public void setTypeId(int typeId) {this.typeId = typeId;}

    @Override
    public String toString() {
        return "Blog{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", summary='" + summary + '\'' +
                ", releaseDate=" + releaseDate +
                ", clickHit=" + clickHit +
                ", replyHit=" + replyHit +
                ", content='" + content + '\'' +
                ", typeId=" + typeId +
                '}';
    }
}
